package com.bjsxt.controller;


import com.bjsxt.pojo.Company;
import com.bjsxt.pojo.MarriedPerson;
import com.bjsxt.pojo.PageResult;
import com.bjsxt.service.IMarriedPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-02-22
 */
@Controller
@RequestMapping("/marriedPerson")
public class MarriedPersonController {
    //声明service层属性
    @Autowired
    private IMarriedPersonService marriedPersonService;
    //声明单元方法：分页加载公司信息
    @ResponseBody
    @RequestMapping("marryInfo")
    public PageResult<MarriedPerson> companyInfo(Integer page, Integer rows, String pname, String phone){
        //处理请求
        PageResult<MarriedPerson> pageResult=marriedPersonService.selMarriedInfoService(page,rows,pname,phone);
        //响应结果
        return pageResult;
    }
}

